<?php
namespace app\serverauthcode\validate;

use \app\manage\validate\BaseValidate;
/**
 * Created by PhpStorm.
 * User: 97606
 * Date: 2017/6/14
 * Time: 16:17
 */
class AuthCode extends BaseValidate
{
    protected $rule = [
        "appkey"      => ['alphaNum', 'length' => '32'],
        "type"        => ['in'=>'register,login,forgetLoginPwd,contactus'],
        "code_id"     => ['require','integer','gt'=>0],
        "auth_code"   => ['require','min'=>2],
    ];

    protected $message = [

    ];

    protected $scene = [
        "add"    => ["token","appkey","type","code_id"],
        "verify" => ["token","appkey","type","code_id","auth_code"],
    ];
}